package com.dai.spec.common.enums;

/**
 * 公告类型枚举
 */
public enum noticeType {
    TONGZHI("1", "通知"),
    GONGGAO("2", "公告");
    private String code;
    private String value;

    noticeType(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByCode(String code) {
        for (noticeType noticeTypeEnum : noticeType.values()) {
            if (noticeTypeEnum.getCode().equals(code)) {
                return noticeTypeEnum.getValue();
            }
        }
        return null;
    }
}
